/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.hk.adv.entity;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 传统文化配置Entity
 * @author 罗天文
 * @version 2018-03-20
 */
public class HkTraditionAdvIntegral extends DataEntity<HkTraditionAdvIntegral> {
	
	private static final long serialVersionUID = 1L;
	private HkTraditionAdv tradition;		// 广告id
	private HkTraditionAdvReward reward;		// 奖励配置id 父类
	private String type;		// 积分类型
	private String integral;		// 积分
	private Date beginDate;		// 开始时间
	private Date endDate;		// 结束时间
	private String countryId;		// 国家
	private String provinceId;		// 省
	private String cityId;		// 市
	
	public HkTraditionAdvIntegral() {
		super();
	}

	public HkTraditionAdvIntegral(String id){
		super(id);
	}

	public HkTraditionAdvIntegral(HkTraditionAdvReward reward){
		this.reward = reward;
	}

	@NotNull(message="广告id不能为空")
	public HkTraditionAdv getTradition() {
		return tradition;
	}

	public void setTradition(HkTraditionAdv tradition) {
		this.tradition = tradition;
	}
	
	@Length(min=0, max=32, message="奖励配置id长度必须介于 0 和 32 之间")
	public HkTraditionAdvReward getReward() {
		return reward;
	}

	public void setReward(HkTraditionAdvReward reward) {
		this.reward = reward;
	}
	
	@Length(min=0, max=1, message="积分类型长度必须介于 0 和 1 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Length(min=0, max=11, message="积分长度必须介于 0 和 11 之间")
	public String getIntegral() {
		return integral;
	}

	public void setIntegral(String integral) {
		this.integral = integral;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@Length(min=0, max=32, message="国家长度必须介于 0 和 32 之间")
	public String getCountryId() {
		return countryId;
	}

	public void setCountryId(String countryId) {
		this.countryId = countryId;
	}
	
	@Length(min=0, max=32, message="省长度必须介于 0 和 32 之间")
	public String getProvinceId() {
		return provinceId;
	}

	public void setProvinceId(String provinceId) {
		this.provinceId = provinceId;
	}
	
	@Length(min=0, max=32, message="市长度必须介于 0 和 32 之间")
	public String getCityId() {
		return cityId;
	}

	public void setCityId(String cityId) {
		this.cityId = cityId;
	}
	
}